import { setupDirective } from '@/directive'
import { setupRouter } from '@/router/index.js'
import { setupStore } from '@/store/index.js'
import { setupPermission } from '@/plugins/permission'
import { setupIcons } from '@/components/icon'

export default {
  install(app) {
    // 安装图标
    setupIcons()
    // 自定义指令(directive)
    setupDirective(app)
    // 路由(router)
    setupRouter(app)
    // 状态管理(store)
    setupStore(app)
    // 设置路由守卫
    setupPermission()
  },
}
